-- GENERATED SPELL FOR [Sulfuron Magma-Thrower] --


function spell0_20909(pUnit, Event) --@Magma-Thrower\'s Curse,Heal--
pUnit:FullCastSpellOnTarget(36917,pUnit)
pUnit:RegisterEvent('Sorts_20909', 575, 1)
end

function spell1_20909(pUnit, Event) --@Shadow Bolt,n/a--
pUnit:FullCastSpellOnTarget(36987,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_20909', 1000, 1)
end

function spell2_20909(pUnit, Event) --@Shadow Bolt,n/a--
pUnit:FullCastSpellOnTarget(39025,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_20909', 1000, 1)
end

function Sorts_20909(pUnit, Event)
local choix_sorts_20909 = math.random(0, 2)
if choix_sorts_20909 == 0 then
pUnit:RegisterEvent('spell0_20909', 1, 1)
end
if choix_sorts_20909 == 1 then
pUnit:RegisterEvent('spell1_20909', 1, 1)
end
if choix_sorts_20909 == 2 then
pUnit:RegisterEvent('spell2_20909', 1, 1)
end
end

function mob20909_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_20909', math.random(1500, 3000), 1)
end

function mob20909_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob20909_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob20909_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(20909, 1, 'mob20909_Action')
RegisterUnitEvent(20909, 2, 'mob20909_Leave')
RegisterUnitEvent(20909, 3, 'mob20909_Kill')
RegisterUnitEvent(20909, 4, 'mob20909_Die')
